#coding=utf8
import web
import os
 
urls = (
    '/', 'index','/ldata','ldata'
)
 
class index:
    def GET(self):
        command = '/work/ModemWarface/shell/xmipa.sh'
        textlist = os.popen(command).readlines()#执行linux命令的哦
        result = '<h1>xdzz</h1>'
        for line in textlist:
                result = '%s\n%s'%(result,line)
        return result#其实直接return textline也是可以哦
 
class ldata:
    def GET(self):
        command = '/work/ModemWarface/shell/xm-locale-data.sh'
        textlist = os.popen(command).readlines()#执行linux命令的哦
        result = '<h1>xdzz-locale-data</h1>'
        for line in textlist:
                result = '%s\n%s'%(result,line)
        return result#其实直接return textline也是可以哦
if __name__ == "__main__":
    app = web.application(urls, globals())
    app.run()

